package com.example.springbootlearn.service.order;

import com.example.springbootlearn.annotation.TestOrder;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author libo
 * @Date 2023/5/6 22:37
 */


@TestOrder(8)
@Service
public class ObjectConvertHandler {

    public static void main(String[] args) {
        Map<String, Integer> hashMap = new HashMap();
//        hashMap.computeIfPresent("A", (k, v) -> v + 1);
        hashMap.put("A", 1);
        hashMap.merge("A", 1, Integer::sum);
//        hashMap.compute("A", (k, v) -> v + 1);
        System.out.println("hashmap------->" + hashMap);
    }
}
